package dna_sequence;

/**
 * Author: Daniel
 * Date: 20.09.13
 */

public class DNASequence {

    private String sequence;

    public DNASequence(String sequence) {
        this.sequence = sequence;
    }

    @Override
    public String toString() {
        return sequence;
    }

    public String reverse() {
        StringBuilder builder = new StringBuilder();
        for (int i = sequence.length() - 1; i >= 0; i--) {
            builder.append(sequence.charAt(i));
        }
        return builder.toString();
    }
}
